home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 120
/
Vol 120.iso
/
games
/
battlefi.swf
/
scripts
/
frame_638
/
PlaceObject2_331_11
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2010-11-09
|
1KB
|
53 lines
onClipEvent(enterFrame){
if(_root.vic)
{
this._y = 491.2;
}
if(!this.hitTest(_root.castle))
{
this._x += speed;
}
if(duped && _root.population < _root.poptot)
{
_root.population = _root.population + 1;
_root.gold -= 100;
i++;
duplicateMovieClip(_root.inf,"MC" + i,16384 + (200 + i));
_root["MC" + i]._x = -6.399999999999999;
_root["MC" + i]._y = random(50) + 251.7;
duped = false;
}
if(this.hitTest(_root.castle) && !attkin)
{
this.gotoAndPlay("attk");
attkin = true;
}
if(this.dead && this._currentframe < 18)
{
this.gotoAndPlay("die");
}
if(this.hit.hitTest(_root.castle["th" + _root.castle.thing.i]))
{
this.gotoAndPlay("die");
_root.castle["th" + _root.castle.thing.i].removeMovieClip();
}
if(this.dead)
{
this._x -= speed;
}
if(this.deadfull)
{
this._x = -1000000000;
}
l = _root.lvl;
while(l < _root.lvl + 0.1)
{
if(this.hit.hitTest(_root["a" + l]))
{
this.gotoAndPlay("die");
_root["a" + l].removeMovieClip();
}
l++;
}
}